package com.ruoyi.common.enums;

public enum LogInfoType {
    ADD("0", "增加"),
    DEL("1", "删除"),
    UPD("2", "修改");

    private String code;
    private String desc;

    LogInfoType(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDesc(String code) {
        for (LogInfoType value : values()) {
            if (value.getCode().equals(code)) {
                return value.getDesc();
            }
        }
        return "";
    }
}
